import { get, post, del } from "../plugins/request";

export const APiupload = (parmas, config) =>
  post("/api/admin/common/upload", parmas, config);

// 登录
export const APilogin = (parmas) => post("/api/admin/auth/login", parmas);

// 菜单
export const Apimenu = (parmas) => get("/api/admin/menu", parmas);
export const ApimenuAdd = (parmas) => post("/api/admin/menu", parmas);
export const ApimenuEdit = (parmas, id) =>
  post("/api/admin/menu/" + id, parmas);
export const ApimenuDel = (id) => del("/api/admin/menu/" + id);

// 权限
export const Apipermission = (parmas) => get("/api/admin/permission", parmas);
export const ApipermissionAdd = (parmas) =>
  post("/api/admin/permission", parmas);
export const ApipermissionEdit = (parmas, id) =>
  post("/api/admin/permission/" + id, parmas);
export const ApipermissionDel = (id) => del("/api/admin/permission/" + id);

// 角色
export const Apirole = (parmas) => get("/api/admin/role", parmas);
export const ApiroleAdd = (parmas) => post("/api/admin/role", parmas);
export const ApiroleEdit = (parmas, id) =>
  post("/api/admin/role/" + id, parmas);
export const ApiroleDel = (id) => del("/api/admin/role/" + id);
export const ApirolePermission = (parmas) =>
  get("/api/admin/role/permission/list", parmas);
export const ApirolepermissionPut = (parmas, id) =>
  post("/api/admin/role/permission/" + id, parmas);

// 患者管理
export const Apipatient = (parmas) => get("/api/admin/patient", parmas);
export const ApipatientAdd = (parmas) => post("/api/admin/patient", parmas);

//项目列表
export const Apiitem = (parmas) => get("/api/admin/item", parmas);
//分类列表
export const ApiCateList = (parmas) => get("api/admin/item/cateList", parmas);
//添加分类
export const ApiItemAdd = (parmas) => post("/api/admin/item", parmas);

//修改分类

export const ApiItemEdit = (parmas, id) =>
  post("/api/admin/item/" + id, parmas);

//删除分类
export const ApiItemDel = (id) => del("/api/admin/item/" + id);

//添加价格
export const ApiItemEditprice = (parmas, id) =>
  post("/api/admin/item/price/" + id, parmas);

//修改是否上架
export const ApiItemEditsale = (parmas, id) =>
  post("/api/admin/item/sale/" + id, parmas);

//用户管理
export const ApiUserList = (parmas) => get("api/admin/user/userList", parmas);
//修改用户
export const ApiUserEdit = (data, id) =>
  post("api/admin/user/updateUser/" + id, data);
//获取用户列表数据
export const ApigetUserOrderList = (id, parmas) =>
  get("api/admin/user/userOrderList/" + id, parmas);

//获取护理人员列表
export const ApigetDoctorList = (parmas) =>
  get("api/admin/doctor/doctorList", parmas);
//编辑护理人员
export const ApiDoctorEdit = (data, id) => post("api/admin/doctor/" + id, data);
//添加护理人员
export const ApiDoctorAdd = (data) => post("api/admin/doctor", data);
//删除护理人员
export const ApiDoctorDel = (id) => del("api/admin/doctor/" + id);
//重置密码
export const ApiResetPassword = (id) =>
  post("api/admin/doctor/resetPassword/" + id);

//查看审核列表
export const ApiQualificationList = (parmas) =>
  get("api/admin/doctor/skillApplyList", parmas);

//审核通过

export const ApiQualificationApplyHandle = (id, parmas) =>
  post("api/admin/doctor/skillApplyHandle/" + id, parmas);

//审核详情

export const ApiskillApply = (id) => get("api/admin/doctor/skillApply/" + id);

//订单列表
export const ApiGetOrderList = (parmas, par) =>
  get("api/admin/order/orderList", parmas, par || {});

export const ApiGetOrderDetail = (id) =>
  get("api/admin/order/orderDetail/" + id);

//订单审核列表
export const ApiGetOrderReviewList = (parmas) =>
  get("api/admin/order/orderReviewList", parmas);
//订单开始审核
export const ApiOrderReviewHandle = (id, parmas) =>
  post("api/admin/order/orderReviewHandle/" + id, parmas);

//订单分配列表
export const ApiGetOrderAllocationList = (parmas, par) =>
  get("api/admin/order/orderAllocationList", parmas, par || {});

//订单开始分配
export const ApiOrderAllocation = (parmas) =>
  post("api/admin/order/orderAllocation", parmas);

//订单进度
export const ApiOrderTimeLine = (id) =>
  get("api/admin/order/orderTimeLine/" + id);

//退款审核列表
export const ApiOrderRefundList = (params) =>
  get("/api/admin/order/orderRefundList", params);
//退款审核
export const ApiOrderRefundHandle = (id, params) =>
  post("/api/admin/order/orderRefundHandle/" + id, params);

//查询分类
export const ApiCategoryList = (params) => get("/api/admin/category", params);
//添加分类
export const ApiAddCategory = (params) => post("/api/admin/category", params);

//添加分类
export const ApiEditCategory = (id, params) =>
  post("/api/admin/category/" + id, params);

//删除分类
export const ApiDelategory = (id) => del("/api/admin/category/" + id);

//获取时间列表数据
export const ApiOrderTime = () => get("/api/admin/system/getOrderTime");

//添加时间数据
export const ApiAddOrderTime = (data) =>
  post("/api/admin/system/saveOrderTime", data);

//护理人员导入
export const ApiDataImport = (data) =>
  post("/api/admin/doctor/data/import", data);

//获取客服电话
export const ApiGetCustomerPhone = () =>
  get("/api/admin/system/getCustomerPhone");

//修改客服电话
export const ApiSetCustomerPhone = (data) =>
  post("/api/admin/system/setCustomerPhone", data);

//获取管理列表
export const ApiAdminuser = (data) => get("/api/admin/adminuser", data);

//新增管理列表
export const ApiAddAdminuser = (data) => post("/api/admin/adminuser", data);

//新增管理列表
export const ApiEditAdminuser = (id, data) =>
  post("/api/admin/adminuser/" + id, data);

//新增管理列表
export const ApiDelAdminuser = (id) => del("/api/admin/adminuser/" + id);

export const APichangePassword = (parmas) =>
  post("/api/admin/auth/changePassword", parmas);

export const Apisystemlog = (parmas) => get("/api/admin/systemlog", parmas);

//配置
export const ApiSkillList = (id) => get("/api/admin/doctor/skillList/" + id);

//保存
export const ApiSkillListSave = (data) =>
  post("/api/admin/doctor/doctorSkill/save", data);

//定义用户须知
export const ApiSetConfig = (data) => post("/api/admin/system/setConfig", data);

//定义用户须知
export const ApiGetConfig = () => get("/api/admin/system/getConfig");


//订单详情
export const ApiGetOrderDetailData = (id) =>
  get("api/admin/order/orderList/" + id);


//历史评价

export const ApiGetOrderCommentList = (id) =>
  get("api/admin/order/commentList/" + id);

//投诉和建议
export const ApiGetComplaint = () =>
  get("api/admin/complaint");








//获取影像报告
export const ApiAdminImageReportList = (id) => get("/api/admin/order/getImageReportList", id)


//获取化验报告
export const ApiAdminReportList = (id) => get("/api/admin/order/getReportList", id)


//获取化验报告详情
export const ApiAdminExamineReportDetail = (id) => get("/api/admin/order/getExamineReportDetail", id)

//优惠券列表
export const ApiGetCouponList = (parmas) => get("api/admin/coupons", parmas);
//定时发放
export const ApiCouponChangeDaily = (id, parmas) => post("api/admin/coupons/operate/changeDaily/"+ id, parmas);
//添加优惠券
export const ApiGetCouponAdd = (parmas) => post("api/admin/coupons/", parmas);
//修改优惠券
export const ApiGetCouponEdit = (id, parmas) => post("api/admin/coupons/" + id, parmas);
//删除优惠券
export const ApiGetCouponDel = (id) => del("api/admin/coupons/" + id);
//优惠券发放记录
export const ApiGetCouponSendList = (parmas) => get("api/admin/coupons/sendList", parmas);
//发放优惠券
export const ApiGetCouponSend = (parmas) => post("api/admin/coupons/operate/send", parmas);


//查看领取记录
export const ApiGetReceiveRecord = (id) => get("api/admin/coupons/sendList/receiveRecord/" + id);


